package com.treasure.mall.biz.repository.user;

import com.treasure.mall.biz.entity.user.UserAddressPO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author allan
 * @version 1.0.0
 * @date 2020/7/6
 */
@Repository
public interface UserAddressRepository extends JpaRepository<UserAddressPO, Long> {
    UserAddressPO findTopByUserIdOrderByDefAddrDesc(Long userId);

    List<UserAddressPO> findByUserId(Long userId);
}
